package springmvc;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-09-29 11:14
 **/
public class ResponsibilityChain {
    public static void main(String[] args) {
        // DispatcherServlet

        //说明
        /*
         *  protected void doDispatch(HttpServletRequest request, HttpServletResponse response) throws Exception
         *  HandlerExecutionChain mappedHandler = null;
         *  //获取到HandlerExecutionChain对象
         *  mappedHandler = getHandler(processedRequest);
         *  // 在applyPreHandle方法中 HandlerInterceptor[] interceptors = getInterceptors();获取到了注册了的拦截器
         *  // 并且调用了拦截器的preHandle方法
         *  if (!mappedHandler.applyPreHandle(processedRequest, response)) {
					return;
				}
			// 获取到拦截器并调用拦截器的postHandle方法
			mappedHandler.applyPostHandle(processedRequest, response, mv);
         */
    }
}
